﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace WmsApp.UI
{
    public partial class QPayApplyBillDtl : QPayApplyBill, IQueryControl
    {
        public QPayApplyBillDtl()
        {
            InitializeComponent();
        }

        #region IQueryControl Members

        public new string GetCondition()
        {
            string condition = base.GetCondition();
            if(!String.IsNullOrEmpty(condition))
            {
                condition = String.Format( " and PayApplyBillID in (select PayApplyBillID from dbo.PayApplyBill where 1=1 {0}) " ,condition);
            }
  
            if(!String.IsNullOrEmpty(this.textEditInvoiceNo.Text.Trim()))
            {
                condition += (String.Format(" and InvoiceNo like '%{0}%'", this.textEditInvoiceNo.Text));
            }
            return condition;
        }

        #endregion
    }
}
